<link rel="stylesheet" href="__CDN__/assets/element-ui-2.15.14/css/index.css">
<link rel="stylesheet" href="__CDN__/assets/css/vvv.css">
<link href="__CDN__/assets/css/sweetalert.css" rel="stylesheet">
<style>
    .el-form-item__label {
        width: 120px !important;
    }

    .el-tag + .el-tag {
        margin-left: 10px;
    }

    .button-new-tag {
        margin-left: 10px;
        height: 32px;
        line-height: 30px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .input-new-tag {
        width: 90px;
        margin-left: 10px;
        vertical-align: bottom;
    }

    input[type="file"] {
        display: none !important;
    }

    .el-form-item__error {
        margin-left: 10px;
    }

    .search-select .el-input--suffix .el-input__inner {
        width: 130px;
    }

    .drawer-box {
        margin: 20px 20px 50px 20px;
    }

    .layout-pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .buttons {
        display: flex;
        align-items: center;
    }

    .buttons .v-btn {
        margin-right: 10px;
    }

    .buttons .btn-text {
        font-size: 13px;
        color: #606266;
        margin-right: 10px;
    }
</style>
<div id="vue" v-cloak>
    <div class="screen-container">
        <div class="screen-container-show">
            <el-button style="margin-top: 14px;" size="small" @click="refreshPage" icon="el-icon-refresh" circle
                       type="primary"></el-button>
            <div class="screen-container-left display-flex">
                <div class="datetime">
                    <el-date-picker
                            v-model="search.startTime"
                            type="datetime"
                            placeholder="选择起始时间">
                    </el-date-picker>
                </div>
                <div class="datetime">
                    <el-date-picker
                            v-model="search.endTime"
                            type="datetime"
                            placeholder="选择结束时间">
                    </el-date-picker>
                </div>
            </div>
            <div class="search-select screen-container-right display-flex keyword v-key">
                <el-input @clear="handleClearSearchInp" clearable v-model="search.keyword" placeholder="请输入您要搜索的内容">
                    <el-select v-model="search.type" slot="prepend" placeholder="请选择">
                        <el-option v-for="(item, index) in searchOpt" :label="item.value"
                                   :value="item.id">
                        </el-option>
                    </el-select>
                    <el-button slot="append" @click="searchData" icon="el-icon-search"></el-button>
                </el-input>
            </div>
        </div>
    </div>
    <div class="vue-table background-white color-666">
        <el-table :data="tableData" border highlight-current-row v-loading="listLoading"
                  @sort-change="sortChange" element-loading-text="拼命加载中..."
                  @selection-change="handleSelectionChange" style="width: 100%">
            <el-table-column prop="id" width="70" label="编号" show-overflow-tooltip
                             align="center"></el-table-column>
            <el-table-column prop="username" width="170" label="用户名" show-overflow-tooltip
                             align="center"></el-table-column>
            <el-table-column prop="nickname" label="用户昵称" show-overflow-tooltip
                             align="center"></el-table-column>
            <el-table-column prop="avatar" label="照片" width="80" align="center">
                <template scope="scope">
                    <a :href="scope.row.avatar" target="_blank">
                        <img :src="scope.row.avatar" style="border-radius: 10px;width: 48px;height: 48px;padding: 5px">
                    </a>
                </template>
            </el-table-column>
            <el-table-column prop="mobile" width="150" label="手机号码" show-overflow-tooltip
                             align="center"></el-table-column>
            <el-table-column prop="createtime" width="160" :formatter="dateFormat" label="创建时间" show-overflow-tooltip
                             align="center"></el-table-column>
            <el-table-column align="center" width="130" fixed="right" label="操作">
                <template scope="scope">
                    <button @click="handleSelect(scope.row)" type="button"
                            class="el-button el-button--primary el-button--small"><i
                            class="el-icon-user-solid"></i><span>选择</span>
                    </button>
                </template>
            </el-table-column>
        </el-table>
        <div class="layout-pagination">
            <div class="buttons">
                <div class="btn-text">共{{totalCount}}用户</div>
            </div>
            <el-pagination
                    background
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="currentPage"
                    :page-sizes="[10, 20, 50, 100]"
                    :page-size="pageSize"
                    layout="sizes, prev, pager, next, jumper"
                    :total="totalCount">
            </el-pagination>
        </div>
    </div>
</div>

<script src="__CDN__/assets/element-ui-2.15.14/js/vue.js"></script>
<script src="__CDN__/assets/element-ui-2.15.14/js/index.js"></script>
<script src="__CDN__/assets/tool/libs/moment.js"></script>
<script src="__CDN__/assets/js/sweetalert.min.js"></script>
<script src="__CDN__/assets/js/jquery-2.1.1.min.js"></script>